package com.redis.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.redis.service.UserService;

@RestController
public class UserController {
@Autowired
private UserService userService;
	@RequestMapping("/setRedis")
	public String setRedis(String key,String value){
		return userService.setUser(key, value);
	}
	
	@RequestMapping("/getRedis")
	public String getRedis(String key){
		return userService.getUser(key);
	}
}
